package extendExamples;

class Animal {
	public Animal() {
		System.out.println(" init animal");
	}
}

class Bird extends Animal {
	public Bird() {
		System.out.println(" init bird");
	}
}

/**
 * 企鹅 继承 鸟
 */
public class Goose extends Bird {
	public Goose() {
		System.out.println(" init goose");
	}

	void eat() {
		System.out.println("eat");
	}

	static void say() {
		System.out.println("静态测试");
	}

	public static void main(String[] args) {
		//new Goose().eat();
		Goose.say();
		/*
		result:
		init animal
		init bird
		init goose
		eat*/
	}
}
